package com.rgbgame.editor;

import processing.core.PApplet;

public class OpenWidget extends UIDockWidget {

	/**
	 * 
	 */
		
	public boolean locked;

		public OpenWidget(PApplet pApplet, float w, float h, UIDock p){
			super(pApplet, w,h,"Open File",p);
			normalIcon = pApplet.loadImage("open.png");
			hoverIcon = normalIcon;
			selectedIcon = pApplet.loadImage("open.png");
			selectedIcon.filter(PApplet.INVERT);
			selectedIcon.filter(PApplet.THRESHOLD);
			locked = false;
		}

		public OpenWidget(PApplet pApplet, UIDock p){
			this(pApplet, p.dockWidth,p.dockWidth,p);
			locked = false;
		}

		public void onSelect(){
			//this.com.rgbgame.editor.rgbEditor.toolType = this.com.rgbgame.editor.rgbEditor.TOOL_MAG;
			//selectMe();
			//mode = this.com.rgbgame.editor.rgbEditor.SELECTED;
			//FIXME:
			locked = true;
			rgbEditor.editor.chooseFile();
			//com.rgbgame.editor.rgbEditor.lastPressed = false;
			return;
		}
	
}
